// Plugin-specific config protos for StepController plugins.

syntax = "proto3";

package nighthawk.adaptive_load;

import "envoy/config/core/v3/extension.proto";

// Configuration for ExponentialSearchStepController (plugin name:
// "nighthawk.exponential_search") that performs an exponential search for the optimal
// value of a single Nighthawk input variable (e.g. RPS). Exponential search
// starts with the input set to |initial_value| and increases the input by
// |exponential_factor| until the metric goes outside thresholds at some input
// value X (i.e. the sign of the score becomes negative); then it performs a
// binary search with input values between (X/exponential_factor) and X for the
// highest input value for which the metric is within thresholds.
message ExponentialSearchStepControllerConfig {
  // Selects a plugin that knows how to apply a numeric value generated by the
  // StepController within CommandLineOptions. Optional, defaults to "nighthawk.rps"
  // plugin, which sets |requests_per_second| in CommandLineOptions.
  envoy.config.core.v3.TypedExtensionConfig input_variable_setter = 1;
  // Initial value of the input variable that should be attempted. Required.
  double initial_value = 2;
  // Factor to increase the input variable during the exponential phase.
  // Optional, default 2.0.
  double exponential_factor = 3;
}
